﻿using System;
using System.Linq;
using System.Collections.Generic;
using System.Text;
using System.Xml;

namespace FourSquareNETLibrary
{
    public class score
    {
        private int _points;
        private Uri _icon;
        private string _message;

        public score(XmlNode Xml)
        {
            XmlNodeList xnl = Xml.ChildNodes;
            foreach (XmlNode xn in xnl)
            {
                switch (xn.Name)
                {
                    case "points":
                        this._points = Convert.ToInt32(xn.InnerText);
                        break;
                    case "icon":
                        this._icon = new Uri(xn.InnerText);
                        break;
                    case "message":
                        this._message = xn.InnerText;
                        break;
                }
            }
        }

        public int Points
        {
            get
            {
                return this._points;
            }
        }

        public Uri Icon
        {
            get
            {
                return this._icon;
            }
        }

        public string Message
        {
            get
            {
                return this._message;
            }
        }
    }
}
